import {http} from "@/plugins/net";

export const  getTableNames = async () => {
    const res = await http('/gen/tables','get')
    if (res) {
        return res
    }
}

export const getTableFields = async (tableName) => {
    const res = await http(`/gen/fields?tableName=${tableName}`,'get');
    if(res) {
        return res
    }
}

export const generateCode = async (params) => {
    const res = await http('/gen/generate','post',params)
    if (res){
        console.log(res)
    }
}